home *** CD-ROM | disk | FTP | other *** search
- function loadCustomArtwork(aPath, aArtworkID)
- {
- var vXmlFile = aPath + aArtworkID + ".xml";
- trace("customXML: " + vXmlFile);
- ARTWORK_xml = new XML();
- ARTWORK_xml.ignoreWhite = true;
- ARTWORK_xml.load(vXmlFile);
- ARTWORK_xml.onLoad = function(isSuccess)
- {
- if(isSuccess)
- {
- var _loc5_ = this.firstChild;
- if(_loc5_.nodeName = "CUSTOM_ART")
- {
- var _loc6_ = _loc5_.childNodes.length;
- var _loc3_ = 0;
- while(_loc3_ < _loc6_)
- {
- var _loc2_ = _loc5_.childNodes[_loc3_];
- var _loc4_ = _loc2_.nodeName;
- switch(_loc4_)
- {
- case "IMAGE":
- imageFile = aPath + _loc2_.attributes.file;
- vImageWidth = parseInt(_loc2_.attributes.width);
- vImageHeight = parseInt(_loc2_.attributes.height);
- if(vImageWidth < vImageHeight)
- {
- aspectRatioType = "portait";
- shortDimension = vImageWidth;
- }
- else
- {
- aspectRatioType = "landscape";
- shortDimension = vImageHeight;
- }
- break;
- case "THUMBNAIL":
- thumbnailFile = aPath + _loc2_.attributes.file;
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- gotoAndStop(2);
- xmlLoadComplete();
- }
- else
- {
- trace("ERROR: artwork xml failed to load. " + vXmlFile);
- }
- };
- }
- stop();
- var aspectRatioType = "";
- var shortDimension = 0;
- var imageFile = "";
- var thumbnailFile = "";
- var vImageWidth;
- var vImageHeight;
- var ARTWORK_xml;
- var o = _root.customArtObjectMatcher.getInfoObject();
- loadCustomArtwork(_root.getCustomDirectory(),o.tokenID);
-